<?php
class Hero{
	public $hp = 100;
	public $mp = 100;
	public $attack = 100;
	public $defanse = 100;
	public $equip = array();

	public function setHp($hp) {
		$this->hp = $hp;
	}

	public function setMp($mp) {
		$this->mp = $mp;
	}

	public function setAttack($attack) {
		$this->attack = $attack;
	}

	public function setDefanse($defanse) {
		$this->defanse = $defanse;
	}

	public function setEquip($equip) {
		$this->equip = $equip;
	}

	public function display(){
		$output = array(
			"生命值：{$this->hp}",
			"精力值：{$this->mp}",
			"攻击力：{$this->attack}",
			"防御力：{$this->defanse}",
			"装备列表：" . implode('，', $this->equip)
		);
		echo implode('<br/>', $output);
	}
}